<!-- 作品详情页
记得添加删除按钮 -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>壹码当先 - 作品详情</title>
    <!-- Custom Main StyleSheet CSS -->
    <link href="/pages/style.css" rel="stylesheet">
    <!-- Color CSS -->
    <link href="/pages/css/color.css" rel="stylesheet">
    <link href="/pages/css/color-2.css" rel="stylesheet">
    <!-- Responsive CSS -->
    <link href="/pages/css/responsive.css" rel="stylesheet">
    <!--scrath js-->
    <script type="text/javascript" src="/scratch/swfobject.js"></script>
    <script type="text/javascript" src="/pages/js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function () {
            var productId = localStorage['productId'];
            detail(productId);
            window.setTimeout(function () {
                installPlayer('/scratch/Scratch.swf', 'PlayerOnly');
            }, 1000);//一秒后再调用赋值方法
        });
        //加载详情
        function detail(productionId) {

            var url = '/user/product/detail';
            if (productionId.length > 0) {
                $.post(url, {id: productionId}, function (result) {
                    if (result.status === 1) {
                        var data = result.data;
//                        $("#productId").val(data.id);
                        $("#productName").html(data.name);
                        $("#createTime").html(data.createTime);
                        $("#introduction").html(data.introduction);
                        $("#sburl").val(data.sburl);
                    }
                    else {
                        window.location.href = "/pages/ymdx/showpages/showworks.html";
                    }
                })
            }
        }


        //初始化 sb2文件
        function installPlayer(swfName, swfID) {
            var fwidth = 500;	// flash view width
            var fheight = 420; 	// flash view height
            var sb2path = $("#sburl").val();
//            var sb2path = "/upload/sb2/20170916211927436f68c.sb2";
            var flashvars = {
                project: sb2path,
                autostart: 'false'
            };
            var params = {
                allowScriptAccess: 'always',
                allowFullScreen: 'true'
            };
            var attributes = {};
            swfobject.embedSWF(swfName, swfID, fwidth, fheight, '10.0', false, flashvars, params, attributes);
        }
    </script>
</head>

<body>

<!--gt Wrapper Start-->
<div class="gt_wrapper">

    <!--Sub Banner Wrap Start -->
    <div class="gt_sub_banner_bg default_width">
        <div class="container">
            <div class="gt_sub_banner_hdg  default_width">
                <h2>作品详情</h2>
                <h6>壹码当先&nbsp;·&nbsp;让更多的孩子爱上编程</h6>
            </div>
        </div>
    </div>
    <!--Sub Banner Wrap End -->
    <!--Breadcrumb Wrap End -->
    <div class="gt_breadcrumb_bg default_width">
        <div class="container">
            <div class="gt_breadcrumb_wrap default_width">
                <ul>
                    <li><a href="/pages/index.html">首页</a></li>
                    <li><a href="/pages/ymdx/users/myworks.html">作品展示</a></li>
                    <li><a href="/pages/ymdx/showpages/showworks_detail.html">作品详情</a></li>
                </ul>
            </div>
        </div>
    </div>
    <!--Breadcrumb Wrap End -->


    <input id="sburl" value="" hidden>
    <!--Content Wrap Start-->
    <div class="gt_main_content_wrap">
        <!--Shop Wrap Start-->
        <section class="gt_shop_detail_bg gt_courses_bg">
            <div class="container">
                <div class="gt_product_detail_border_wrap">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="gt_shop_slider_outer_wrap">
                                <div class="shop_detaild_slider">
                                    <div id="shop_detaild_slider">
                                        <ul class="slides" style="width: 500px; height: 420px;">
                                            <li>
                                                <div id="PlayerOnly" style="width: 500px; height: 420px;">
                                                    <p style="margin: auto; padding: 2px; WIDTH: 270px;  BACKGROUND-COLOR: #FFFFCC; text-align: center; font-size: 9pt; height: 90px;  left:60px;">
                                                        <br />
                                                        Scris Robot 对你说：加载 Scratch文件 中……<br />
                                                        <br />
                                                        如果 Scratch文件（或者Sb2文件） 很久未能加载,<br />
                                                        <br />
                                                        请确认是否已安装<a href="http://get.adobe.com/flashplayer/">Flash插件</a>或版本是否太低！</p>
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-6">
                            <div class="gt_shop_detail_banner">
                                <h4 id="productName">点球大战</h4>
                                <div class="gt_shop_rating_wrap">
                                    <ul>
                                        <li><a href="#"><i class="fa fa-star-half-full"></i></a></li>
                                        <li><a href="#"><i class="fa fa-star-half-full"></i></a></li>
                                        <li><a href="#"><i class="fa fa-star-half-full"></i></a></li>
                                        <li><a href="#"><i class="fa fa-star-half-full"></i></a></li>
                                        <li><a href="#"><i class="fa fa-star-half-full"></i></a></li>
                                    </ul>
                                    <span>作者：<span id="author">壹码当先</span></span><span>上传时间：<span id="createTime">2017-09-15</span></span>
                                </div>
                                <div class="gt_shop_price_wrap">
                                </div>
                                <div class="gt_product_detail_des">
                                    <h5>作品介绍</h5>
                                    <p id="introduction"></p>
                                </div>
                                <!-- <div class="gt_product_button_wrap">
                                  <button>Add to Cart</button>
                                  <button>Whishlist</button>
                                </div> -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!--Shop Wrap End-->
    </div>
    <!--Content Wrap End-->


</div>
<!--gt Wrapper End-->


<!--Jquery Library-->
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<!--Bootstrap core JavaScript-->
<script src="http://www.jq22.com/jquery/bootstrap-3.3.4.js"></script>
<!--Owl Carousel JavaScript-->
<script src="/pages/js/owl.carousel.js"></script>
<!--Filter able JavaScript-->

<!--Custom JavaScript-->
<script src="/pages/js/custom.js"></script>

</body>
</html>
